home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / GXEnvironment.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  9.5 KB  |  341 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        GXEnvironment.a
  3. ;
  4. ;    Contains:    QuickDraw GX environment constants and interfaces
  5. ;
  6. ;    Version:    Technology:    Quickdraw GX 1.1
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__GXENVIRONMENT__') = 'UNDEFINED' THEN
  18. __GXENVIRONMENT__ SET 1
  19.  
  20.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  21.     include 'ConditionalMacros.a'
  22.     ENDIF
  23.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  24.     include 'MixedMode.a'
  25.     ENDIF
  26.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  27.     include 'Quickdraw.a'
  28.     ENDIF
  29.     IF &TYPE('__GXTYPES__') = 'UNDEFINED' THEN
  30.     include 'GXTypes.a'
  31.     ENDIF
  32.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  33.     include 'CMApplication.a'
  34.     ENDIF
  35.  
  36.  
  37. defaultPollingHandlerFlags        EQU        $00
  38. okToSwitchDuringPollFlag        EQU        $00
  39. dontSwitchDuringPollFlag        EQU        $01
  40. ; typedef long                             gxPollingHandlerFlags
  41.  
  42. ;
  43. ; extern gxPollingHandlerUPP GXGetGraphicsPollingHandler(long *reference)
  44. ;
  45.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  46.         Macro
  47.         _GXGetGraphicsPollingHandler
  48.             move.w              #$0245,D0
  49.             dc.w                $A832
  50.         EndM
  51.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  52.         IMPORT_CFM_FUNCTION GXGetGraphicsPollingHandler
  53.     ENDIF
  54.  
  55. ;
  56. ; extern void GXSetGraphicsPollingHandler(gxPollingHandlerUPP handler, long reference)
  57. ;
  58.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  59.         Macro
  60.         _GXSetGraphicsPollingHandler
  61.             move.w              #$0246,D0
  62.             dc.w                $A832
  63.         EndM
  64.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  65.         IMPORT_CFM_FUNCTION GXSetGraphicsPollingHandler
  66.     ENDIF
  67.  
  68.  
  69. ;  QD to QD GX Translator typedefs 
  70.  
  71. gxDefaultOptionsTranslation        EQU        $0000
  72. gxOptimizedTranslation            EQU        $0001
  73. gxReplaceLineWidthTranslation    EQU        $0002
  74. gxSimpleScalingTranslation        EQU        $0004
  75. gxSimpleGeometryTranslation        EQU        $0008                ; implies simple scaling 
  76. gxSimpleLinesTranslation        EQU        $000C                ; implies simple geometry & scaling 
  77. gxLayoutTextTranslation            EQU        $0010                ; turn on gxLine layout (normally off) 
  78. gxRasterTargetTranslation        EQU        $0020
  79. gxPostScriptTargetTranslation    EQU        $0040
  80. gxVectorTargetTranslation        EQU        $0080
  81. gxPDDTargetTranslation            EQU        $0100
  82. gxDontConvertPatternsTranslation EQU    $1000
  83. gxDontSplitBitmapsTranslation    EQU        $2000
  84. ; typedef long                             gxTranslationOption
  85.  
  86.  
  87. gxContainsFormsBegin            EQU        $0001
  88. gxContainsFormsEnd                EQU        $0002
  89. gxContainsPostScript            EQU        $0004
  90. gxContainsEmptyPostScript        EQU        $0008
  91. ; typedef long                             gxTranslationStatistic
  92.  
  93.  
  94. gxQuickDrawPictTag                EQU        'pict'
  95. gxQuickDrawPict            RECORD 0
  96. ;  translator inputs 
  97. options                     ds.l    1                ; offset: $0 (0)
  98. srcRect                     ds        Rect            ; offset: $4 (4)
  99. styleStretch             ds        Point            ; offset: $C (12)
  100. ;  size of quickdraw picture data 
  101. dataLength                 ds.l    1                ; offset: $10 (16)
  102. ;  file alias 
  103. alias                     ds        gxBitmapDataSourceAlias ; offset: $14 (20)
  104. sizeof                     EQU *                    ; size:   $1E (30)
  105.                         ENDR
  106. ;  WindowRecord utilities 
  107. ;
  108. ; extern gxViewPort GXNewWindowViewPort(WindowPtr qdWindow)
  109. ;
  110.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  111.         Macro
  112.         _GXNewWindowViewPort
  113.             move.w              #$0236,D0
  114.             dc.w                $A832
  115.         EndM
  116.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  117.         IMPORT_CFM_FUNCTION GXNewWindowViewPort
  118.     ENDIF
  119.  
  120. ;
  121. ; extern gxViewPort GXGetWindowViewPort(WindowPtr qdWindow)
  122. ;
  123.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  124.         Macro
  125.         _GXGetWindowViewPort
  126.             move.w              #$0237,D0
  127.             dc.w                $A832
  128.         EndM
  129.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  130.         IMPORT_CFM_FUNCTION GXGetWindowViewPort
  131.     ENDIF
  132.  
  133. ;
  134. ; extern WindowPtr GXGetViewPortWindow(gxViewPort portOrder)
  135. ;
  136.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  137.         Macro
  138.         _GXGetViewPortWindow
  139.             move.w              #$0238,D0
  140.             dc.w                $A832
  141.         EndM
  142.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  143.         IMPORT_CFM_FUNCTION GXGetViewPortWindow
  144.     ENDIF
  145.  
  146. ;  GDevice utilities 
  147. ;
  148. ; extern GDHandle GXGetViewDeviceGDevice(gxViewDevice theDevice)
  149. ;
  150.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  151.         Macro
  152.         _GXGetViewDeviceGDevice
  153.             move.w              #$0239,D0
  154.             dc.w                $A832
  155.         EndM
  156.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  157.         IMPORT_CFM_FUNCTION GXGetViewDeviceGDevice
  158.     ENDIF
  159.  
  160. ;
  161. ; extern gxViewDevice GXGetGDeviceViewDevice(GDHandle qdGDevice)
  162. ;
  163.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  164.         Macro
  165.         _GXGetGDeviceViewDevice
  166.             move.w              #$023A,D0
  167.             dc.w                $A832
  168.         EndM
  169.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  170.         IMPORT_CFM_FUNCTION GXGetGDeviceViewDevice
  171.     ENDIF
  172.  
  173. ;  gxPoint utilities 
  174. ;
  175. ; extern void GXConvertQDPoint(const Point *shortPt, gxViewPort portOrder, gxPoint *fixedPt)
  176. ;
  177.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  178.         Macro
  179.         _GXConvertQDPoint
  180.             move.w              #$023B,D0
  181.             dc.w                $A832
  182.         EndM
  183.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  184.         IMPORT_CFM_FUNCTION GXConvertQDPoint
  185.     ENDIF
  186.  
  187. ;  printing utilities typedef 
  188. ; typedef gxShapeSpoolProcPtr             gxShapeSpoolFunction
  189.  
  190. ; typedef gxUserViewPortFilterProcPtr     gxUserViewPortFilter
  191.  
  192. ; typedef gxConvertQDFontProcPtr         gxConvertQDFontFunction
  193.  
  194. ;  mouse utilities 
  195. ;  return mouse location in fixed-gxPoint global space 
  196. ;
  197. ; extern void GXGetGlobalMouse(gxPoint *globalPt)
  198. ;
  199.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  200.         Macro
  201.         _GXGetGlobalMouse
  202.             move.w              #$023C,D0
  203.             dc.w                $A832
  204.         EndM
  205.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  206.         IMPORT_CFM_FUNCTION GXGetGlobalMouse
  207.     ENDIF
  208.  
  209. ;  return fixed-gxPoint local mouse (gxViewPort == 0 --> default) 
  210. ;
  211. ; extern void GXGetViewPortMouse(gxViewPort portOrder, gxPoint *localPt)
  212. ;
  213.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  214.         Macro
  215.         _GXGetViewPortMouse
  216.             move.w              #$023D,D0
  217.             dc.w                $A832
  218.         EndM
  219.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  220.         IMPORT_CFM_FUNCTION GXGetViewPortMouse
  221.     ENDIF
  222.  
  223. ;  printing utilities 
  224. ;
  225. ; extern gxUserViewPortFilterUPP GXGetViewPortFilter(gxViewPort portOrder, long *refCon)
  226. ;
  227.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  228.         Macro
  229.         _GXGetViewPortFilter
  230.             move.w              #$025E,D0
  231.             dc.w                $A832
  232.         EndM
  233.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  234.         IMPORT_CFM_FUNCTION GXGetViewPortFilter
  235.     ENDIF
  236.  
  237. ;
  238. ; extern void GXSetViewPortFilter(gxViewPort portOrder, gxUserViewPortFilterUPP filter, long refCon)
  239. ;
  240.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  241.         Macro
  242.         _GXSetViewPortFilter
  243.             move.w              #$023E,D0
  244.             dc.w                $A832
  245.         EndM
  246.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  247.         IMPORT_CFM_FUNCTION GXSetViewPortFilter
  248.     ENDIF
  249.  
  250. ;  QD to QD GX Translator functions 
  251. ;
  252. ; extern void GXInstallQDTranslator(GrafPtr port, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStrech, gxShapeSpoolUPP userFunction, void *reference)
  253. ;
  254.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  255.         Macro
  256.         _GXInstallQDTranslator
  257.             move.w              #$023F,D0
  258.             dc.w                $A832
  259.         EndM
  260.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  261.         IMPORT_CFM_FUNCTION GXInstallQDTranslator
  262.     ENDIF
  263.  
  264. ;
  265. ; extern gxTranslationStatistic GXRemoveQDTranslator(GrafPtr port, gxTranslationStatistic *statistic)
  266. ;
  267.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  268.         Macro
  269.         _GXRemoveQDTranslator
  270.             move.w              #$0240,D0
  271.             dc.w                $A832
  272.         EndM
  273.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  274.         IMPORT_CFM_FUNCTION GXRemoveQDTranslator
  275.     ENDIF
  276.  
  277. ;
  278. ; extern gxShape GXConvertPICTToShape(PicHandle pict, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStretch, gxShape destination, gxTranslationStatistic *stats)
  279. ;
  280.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  281.         Macro
  282.         _GXConvertPICTToShape
  283.             move.w              #$0241,D0
  284.             dc.w                $A832
  285.         EndM
  286.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  287.         IMPORT_CFM_FUNCTION GXConvertPICTToShape
  288.     ENDIF
  289.  
  290. ;  Find the best GX style given a QD font and face. Called by the QD->GX translator 
  291. ;
  292. ; extern long GXConvertQDFont(gxStyle theStyle, long txFont, long txFace)
  293. ;
  294.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  295.         Macro
  296.         _GXConvertQDFont
  297.             move.w              #$0242,D0
  298.             dc.w                $A832
  299.         EndM
  300.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  301.         IMPORT_CFM_FUNCTION GXConvertQDFont
  302.     ENDIF
  303.  
  304. ;
  305. ; extern gxConvertQDFontUPP GXGetConvertQDFont(void )
  306. ;
  307.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  308.         Macro
  309.         _GXGetConvertQDFont
  310.             move.w              #$0243,D0
  311.             dc.w                $A832
  312.         EndM
  313.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  314.         IMPORT_CFM_FUNCTION GXGetConvertQDFont
  315.     ENDIF
  316.  
  317. ;
  318. ; extern void GXSetConvertQDFont(gxConvertQDFontUPP userFunction)
  319. ;
  320.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  321.         Macro
  322.         _GXSetConvertQDFont
  323.             move.w              #$0244,D0
  324.             dc.w                $A832
  325.         EndM
  326.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  327.         IMPORT_CFM_FUNCTION GXSetConvertQDFont
  328.     ENDIF
  329.  
  330. ; typedef unsigned long                 gxProfilePoolAttributes
  331.  
  332. gxFlatProfileListItem    RECORD 0
  333. attributes                 ds.l    1                ; offset: $0 (0)        ;  information about this particular profile's source
  334. profileRef                 ds.l    1                ; offset: $4 (4)        ;  reference to profile, only valid before shape is disposed
  335. identifier                 ds        CMProfileIdentifier ; offset: $8 (8)    ;  information on how to find the profile upon unflattening
  336. sizeof                     EQU *                    ; size:   $9A (154)
  337.                         ENDR
  338.  
  339.     ENDIF ; __GXENVIRONMENT__ 
  340.  
  341.